Optimal. Leaf size=47 \[ -\frac {a^2 \csc ^2(c+d x)}{2 d}-\frac {2 a^2 \csc (c+d x)}{d}+\frac {a^2 \log (\sin (c+d x))}{d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.06, antiderivative size = 47, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, integrand size = 27, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.111, Rules used = {2833, 12, 43} \[ -\frac {a^2 \csc ^2(c+d x)}{2 d}-\frac {2 a^2 \csc (c+d x)}{d}+\frac {a^2 \log (\sin (c+d x))}{d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 43
Rule 2833
Rubi steps
\begin {align*} \int \cot (c+d x) \csc ^2(c+d x) (a+a \sin (c+d x))^2 \, dx &=\frac {\operatorname {Subst}\left (\int \frac {a^3 (a+x)^2}{x^3} \, dx,x,a \sin (c+d x)\right )}{a d}\\ &=\frac {a^2 \operatorname {Subst}\left (\int \frac {(a+x)^2}{x^3} \, dx,x,a \sin (c+d x)\right )}{d}\\ &=\frac {a^2 \operatorname {Subst}\left (\int \left (\frac {a^2}{x^3}+\frac {2 a}{x^2}+\frac {1}{x}\right ) \, dx,x,a \sin (c+d x)\right )}{d}\\ &=-\frac {2 a^2 \csc (c+d x)}{d}-\frac {a^2 \csc ^2(c+d x)}{2 d}+\frac {a^2 \log (\sin (c+d x))}{d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.02, size = 42, normalized size = 0.89 \[ a^2 \left (-\frac {\csc ^2(c+d x)}{2 d}-\frac {2 \csc (c+d x)}{d}+\frac {\log (\sin (c+d x))}{d}\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.48, size = 62, normalized size = 1.32 \[ \frac {4 \, a^{2} \sin \left (d x + c\right ) + a^{2} + 2 \, {\left (a^{2} \cos \left (d x + c\right )^{2} - a^{2}\right )} \log \left (\frac {1}{2} \, \sin \left (d x + c\right )\right )}{2 \, {\left (d \cos \left (d x + c\right )^{2} - d\right )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.15, size = 44, normalized size = 0.94 \[ \frac {2 \, a^{2} \log \left ({\left | \sin \left (d x + c\right ) \right |}\right ) - \frac {4 \, a^{2} \sin \left (d x + c\right ) + a^{2}}{\sin \left (d x + c\right )^{2}}}{2 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.18, size = 48, normalized size = 1.02 \[ -\frac {2 a^{2}}{d \sin \left (d x +c \right )}+\frac {a^{2} \ln \left (\sin \left (d x +c \right )\right )}{d}-\frac {a^{2}}{2 d \sin \left (d x +c \right )^{2}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.35, size = 43, normalized size = 0.91 \[ \frac {2 \, a^{2} \log \left (\sin \left (d x + c\right )\right ) - \frac {4 \, a^{2} \sin \left (d x + c\right ) + a^{2}}{\sin \left (d x + c\right )^{2}}}{2 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 8.87, size = 111, normalized size = 2.36 \[ \frac {a^2\,\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{d}-\frac {a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{8\,d}-\frac {{\mathrm {cot}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\,\left (\frac {a^2}{8}+a^2\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{d}-\frac {a^2\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{d}-\frac {a^2\,\ln \left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+1\right )}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ a^{2} \left (\int \cos {\left (c + d x \right )} \csc ^{3}{\left (c + d x \right )}\, dx + \int 2 \sin {\left (c + d x \right )} \cos {\left (c + d x \right )} \csc ^{3}{\left (c + d x \right )}\, dx + \int \sin ^{2}{\left (c + d x \right )} \cos {\left (c + d x \right )} \csc ^{3}{\left (c + d x \right )}\, dx\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________